//
//  USShoppingCartModel.h
//  usale0001
//
//  Created by YU on 16/2/24.
//  Copyright © 2016年 YU. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface USShoppingCartModel : NSObject <NSCoding>

@property (nonatomic, strong) NSMutableArray *shoppingCartList;

/**
 *  Singleton
 */
+ (USShoppingCartModel *)sharedInstance;
/**
 *  保存购物车model 归档
 */
+ (void)saveShoppingCartModel;
///**
// *  to make selected = NO then save
// */
//+ (void)saveShoppingCartModelWithDeselected;
+ (void)shoppingCartReturnToZero;
/**
 *  selected  全部置为 NO 或者 YES
 *
 *  @param selected selected
 */
+ (void)setAllSelect:(BOOL)selected;

+ (void)setAllPropertysToNil;
@end

@interface USShoppingCartList : NSObject <NSCoding>

@property (nonatomic, copy) NSString *providerID;
@property (nonatomic, copy) NSString *providerAvatar;
@property (nonatomic, copy) NSString *providerNickname;
/**
 *  RMB
 */
@property (nonatomic, copy) NSString *providerCurrency;
@property (nonatomic, copy) NSString *providerCurrencyID;
/**
 *  这里为全选含义
 */
@property (nonatomic, assign) BOOL providerSelected;

@property (nonatomic, strong) NSMutableArray *buyProductList;

@end

@interface USShoppingCartProductList : NSObject <NSCoding>

@property (nonatomic, assign) BOOL productSelected;

@property (nonatomic, assign) NSInteger buyNumber;

@property (nonatomic, copy) NSString *productID;
@property (nonatomic, copy) NSString *productLogo;
@property (nonatomic, copy) NSString *productName;
@property (nonatomic, copy) NSString *productType;
@property (nonatomic, copy) NSString *productCurrency;
@property (nonatomic, copy) NSString *productPrice;
@property (nonatomic, copy) NSString *productStock;
@property (nonatomic, copy) NSString *productUnit;
@property (nonatomic, copy) NSString *productSpecification;
@property (nonatomic, copy) NSString *productNetweight;
@property (nonatomic, copy) NSString *isStockInvisible;

/**
 *  商议价格（不保存在本地）
 */
//@property (nonatomic, copy) NSString *productDiscussPrice;
@end
